-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(new_relic sink): Fix handling of dotted attribute names #21305
fix(new_relic sink): Fix handling of dotted attribute names #21305
Conversation
This converts log event into a logs API model simply by transmuting the type wrapper and dropping all arrays, which are not supported by the API. We could flatten out the keys, as this is what New Relic does internally, and we used to do that, but the flattening iterator accessed through `LogEvent::convert_to_fields` adds quotes to dotted fields names, which produces broken attributes in New Relic, and nesting objects is actually a (slightly) more efficient representation of the key names.
Datadog ReportBranch report: ✅ 0 Failed, 7 Passed, 0 Skipped, 25.46s Total Time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
// broken attributes in New Relic, and nesting objects is actually a (slightly) more | ||
// efficient representation of the key names. | ||
let (value, _metadata) = log.into_parts(); | ||
let Some(mut obj) = value.into_object() else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rustlang features too cool for GH syntax highlighting. GH can't handle the coolness
Note that this was tested against a real New Relic account to ensure proper operation. |
Regression Detector ResultsRun ID: 1d5f6e79-97c7-4564-8cec-97f729e8e73d Metrics dashboard Baseline: da1d02d Performance changes are noted in the perf column of each table:
No significant changes in experiment optimization goalsConfidence level: 90.00% There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
|
perf | experiment | goal | Δ mean % | Δ mean % CI | links |
---|---|---|---|---|---|
➖ | file_to_blackhole | egress throughput | -1.95 | [-9.00, +5.10] |
Fine details of change detection per experiment
perf | experiment | goal | Δ mean % | Δ mean % CI | links |
---|---|---|---|---|---|
➖ | otlp_http_to_blackhole | ingress throughput | +2.37 | [+2.23, +2.50] | |
➖ | syslog_log2metric_humio_metrics | ingress throughput | +1.92 | [+1.82, +2.01] | |
➖ | datadog_agent_remap_datadog_logs_acks | ingress throughput | +1.58 | [+1.38, +1.77] | |
➖ | socket_to_socket_blackhole | ingress throughput | +1.48 | [+1.41, +1.56] | |
➖ | fluent_elasticsearch | ingress throughput | +0.98 | [+0.49, +1.47] | |
➖ | syslog_regex_logs2metric_ddmetrics | ingress throughput | +0.93 | [+0.81, +1.06] | |
➖ | datadog_agent_remap_blackhole_acks | ingress throughput | +0.61 | [+0.43, +0.80] | |
➖ | syslog_splunk_hec_logs | ingress throughput | +0.61 | [+0.51, +0.71] | |
➖ | syslog_loki | ingress throughput | +0.51 | [+0.43, +0.60] | |
➖ | datadog_agent_remap_blackhole | ingress throughput | +0.47 | [+0.38, +0.55] | |
➖ | http_to_http_noack | ingress throughput | +0.20 | [+0.11, +0.30] | |
➖ | http_to_http_json | ingress throughput | +0.06 | [+0.01, +0.11] | |
➖ | splunk_hec_to_splunk_hec_logs_noack | ingress throughput | +0.01 | [-0.08, +0.11] | |
➖ | splunk_hec_indexer_ack_blackhole | ingress throughput | +0.00 | [-0.08, +0.08] | |
➖ | splunk_hec_to_splunk_hec_logs_acks | ingress throughput | -0.00 | [-0.12, +0.12] | |
➖ | otlp_grpc_to_blackhole | ingress throughput | -0.23 | [-0.34, -0.12] | |
➖ | http_to_s3 | ingress throughput | -0.39 | [-0.67, -0.11] | |
➖ | http_to_http_acks | ingress throughput | -0.39 | [-1.61, +0.82] | |
➖ | splunk_hec_route_s3 | ingress throughput | -0.77 | [-1.07, -0.47] | |
➖ | http_text_to_http_json | ingress throughput | -0.77 | [-0.90, -0.65] | |
➖ | syslog_humio_logs | ingress throughput | -0.81 | [-0.91, -0.71] | |
➖ | datadog_agent_remap_datadog_logs | ingress throughput | -0.95 | [-1.09, -0.81] | |
➖ | syslog_log2metric_splunk_hec_metrics | ingress throughput | -1.05 | [-1.15, -0.95] | |
➖ | http_elasticsearch | ingress throughput | -1.08 | [-1.25, -0.90] | |
➖ | syslog_log2metric_tag_cardinality_limit_blackhole | ingress throughput | -1.43 | [-1.52, -1.33] | |
➖ | file_to_blackhole | egress throughput | -1.95 | [-9.00, +5.10] |
Explanation
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
…ent API This could not be accomplished the same way as #21305 since the event API cannot handle nested JSON data. Instead, a new `LogEvent::convert_to_fields_unquoted` method was added to produce the flattened data without quoting.
…ent API (#21323) * fix(new_relic sink): Do not quote paths containing periods for the event API This could not be accomplished the same way as #21305 since the event API cannot handle nested JSON data. Instead, a new `LogEvent::convert_to_fields_unquoted` method was added to produce the flattened data without quoting. * Fix and add tests * Drop the extra parameter from `all_fields`
…tdev#21305) * Break up the test functions * Rework test comparison * Use `vrl::value!` to create log event values * Fix encoding of dotted field names through allowing nesting This converts log event into a logs API model simply by transmuting the type wrapper and dropping all arrays, which are not supported by the API. We could flatten out the keys, as this is what New Relic does internally, and we used to do that, but the flattening iterator accessed through `LogEvent::convert_to_fields` adds quotes to dotted fields names, which produces broken attributes in New Relic, and nesting objects is actually a (slightly) more efficient representation of the key names. * Drop redundant `model_map!` test macro
…ent API (vectordotdev#21323) * fix(new_relic sink): Do not quote paths containing periods for the event API This could not be accomplished the same way as vectordotdev#21305 since the event API cannot handle nested JSON data. Instead, a new `LogEvent::convert_to_fields_unquoted` method was added to produce the flattened data without quoting. * Fix and add tests * Drop the extra parameter from `all_fields`
This converts log event into a logs API model simply by transmuting the type
wrapper and dropping all arrays, which are not supported by the API. We could
flatten out the keys, as this is what New Relic does internally, and we used to
do that, but the flattening iterator accessed through
LogEvent::convert_to_fields
adds quotes to dotted fields names, which producesbroken attributes in New Relic, and nesting objects is actually a (slightly)
more efficient representation of the key names.